#ifndef N2VIEW_H_2009_10_14
#define N2VIEW_H_2009_10_14

#include "N1Lib.h"
#include "N2Geometry.h"
#include "N2Drawer.h"

class N2Window;

class N2View : public N1Object {
public:
    N1NAME_DECL

    N2View();
    virtual ~N2View();

    N2Size  getSize() const ;
    N2Rect  getRect() const ;

    N2View* getParent() const ;

    void      setWindow(N2Window* wnd);
    N2Window* getWindow() const ;

    N1Array*  getSubviews() const ;
    void addSubview(N2View* view);

    bool isVisible() const ;
    void setVisible(bool v);

    virtual void draw(N2Drawer* drawer);

protected:
    N2Rect    m_rect;
    N2View*   m_parentView;
    N2Window* m_window;
    N1Array   m_subviews;
};

#endif //N2VIEW_H_2009_10_14
